<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<jsp:useBean id="tables" scope="request" type="java.util.ArrayList"></jsp:useBean>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>Table List</title>
    <style type="text/css">
    <!--
    .style1 {
   	    font-size: 16px;
	    font-weight: bold;
	    line-height:3px;
    }
-->
</style>
 <script type="text/javascript">
    <!--
    function iframeAutoFit()
    {
        var ex;
        try
        {
            if(window!=parent)
            {
                var a = parent.document.getElementsByTagName("iframe");
                
                for(var i=0; i<a.length; i++) //author:meizz
                {
                    if(a[i].contentWindow==window)
                    {
                        var h1=0, h2=0, h3=0, h4=0;
                        if(document.documentElement&&document.documentElement.scrollHeight)
                        {
                            h1 = document.documentElement.scrollHeight;
                            h3 = document.documentElement.scrollWidth;
                        }
                        if(document.body) h2=document.body.scrollHeight;h4=document.body.scrollWidth;
                        

                        var h=Math.max(h1, h2);
                        var h0=Math.max(h3,h4);
                       
                        a[i].style.height = h +"px";
                        a[i].style.width = h0 + "px";
                    }
                }
            }
        }
        catch (ex){}
    }
    
    if(document.attachEvent)
    {
        window.attachEvent("onload",  iframeAutoFit);
        window.attachEvent("onresize",  iframeAutoFit);
    }
    else
    {
        window.addEventListener('load',  iframeAutoFit,  false);
        window.addEventListener('resize',  iframeAutoFit,  false);
    }
    //-->
    </script>
  </head>
  <body leftmargin="0" topmargin="5">
    <% 
    if(tables.size()<1){
      out.println("NO TABLES!");
    }
    else{
      for(int i=0;i<tables.size();i++){
      String tableName=(String)tables.get(i);
      out.println("<p class='style1'><a href='showdetail.do?action=describetable&tableName="+tableName+"' target='_blank'>"+tableName+"</a></p>");
      }
    }
    %>
  </body>
</html>